﻿namespace Traffic.Entity;

/// <summary>
/// 约车出行订单表
/// </summary>
public partial class AppointOrderList
{
    public int Id { get; set; }

    /// <summary>
    /// 用户ID，对应UserData.ID
    /// </summary>
    public int UserId { get; set; }

    /// <summary>
    /// 订单类型  0：普通预约单  1：车票接送单  2：业务接送单  3：商户来源
    /// </summary>
    public int OrderType { get; set; }

    /// <summary>
    /// 外派单对应车票或业务单订单号  OrderType=1||2时必填
    /// </summary>
    public string? FromOrderNum { get; set; }

    /// <summary>
    /// 对应Business.ID
    /// </summary>
    public int FromBusinessId { get; set; }

    /// <summary>
    /// 订单号A+yyyyMMddHHmm+todayCount
    /// </summary>
    public string OrderNum { get; set; } = null!;

    /// <summary>
    /// 调用官方开放接口后生成的对应官方平台的订单流水，用作查询订单信息。
    /// </summary>
    public string? MainOrderId { get; set; }

    /// <summary>
    /// 调用官方开放接口后生成的对应官方平台的订单号，用作查询订单信息。
    /// </summary>
    public string? MainOrderNo { get; set; }

    /// <summary>
    /// 订单创建时间
    /// </summary>
    public DateTime CreateDate { get; set; }

    /// <summary>
    /// 设备下单时获取的经纬度
    /// </summary>
    public string? DeviceLocation { get; set; }

    /// <summary>
    /// 设置下单时获取的地址
    /// </summary>
    public string? DeviceAddress { get; set; }

    /// <summary>
    /// 客户来源
    /// </summary>
    public string? FromParams { get; set; }

    /// <summary>
    /// 乘车人数 默认1
    /// </summary>
    public int MemberCount { get; set; }

    /// <summary>
    /// 行李件数  默认0
    /// </summary>
    public int LuggageCount { get; set; }

    /// <summary>
    /// 客户姓名，对应api riderName
    /// </summary>
    public string? Contact { get; set; }

    /// <summary>
    /// 预定日期时间，传到api时要转成10位时间戳(秒数)
    /// </summary>
    public DateTime BookingDate { get; set; }

    /// <summary>
    /// 实际接送时间
    /// </summary>
    public DateTime? RealBookingDate { get; set; }

    /// <summary>
    /// 订单类型,1:随叫随到;2:预约用车;3:接机;5:送机;6:日租;7:半日租
    /// </summary>
    public int ServiceType { get; set; }

    /// <summary>
    /// 乘车人手机号
    /// </summary>
    public string RiderPhone { get; set; } = null!;

    /// <summary>
    /// 出发城市
    /// </summary>
    public string? StartCity { get; set; }

    /// <summary>
    /// 出发区域
    /// </summary>
    public string? StartDistrict { get; set; }

    /// <summary>
    /// 目的地城市
    /// </summary>
    public string? EndCity { get; set; }

    /// <summary>
    /// 目的地城镇
    /// </summary>
    public string? EndDistrict { get; set; }

    /// <summary>
    /// 上车地点(URLEncode编码后的值)
    /// </summary>
    public string BookingStartAddr { get; set; } = null!;

    /// <summary>
    /// 下车地点(URLEncode编码后的值)
    /// </summary>
    public string BookingEndAddr { get; set; } = null!;

    /// <summary>
    /// 上车地点经度坐标
    /// </summary>
    public string? BookingStartPointLo { get; set; }

    /// <summary>
    /// 上车地点纬度坐标
    /// </summary>
    public string? BookingStartPointLa { get; set; }

    /// <summary>
    /// 下车地点经度坐标
    /// </summary>
    public string? BookingEndPointLo { get; set; }

    /// <summary>
    /// 下车地点纬度坐标
    /// </summary>
    public string? BookingEndPointLa { get; set; }

    /// <summary>
    /// 城市id(测试环境请用44)
    /// </summary>
    public int? CityId { get; set; }

    /// <summary>
    /// 下单车型，如“34”:舒适型/公务级 &quot;35&quot;:商务7座  &quot;40&quot;:商务福祉车  &quot;41&quot;:豪华型/行政级  &quot;43&quot;:畅享型
    /// </summary>
    public int GroupIds { get; set; }

    /// <summary>
    /// 预估金额，传预估返回车型原价disMoney，多车型时以最低价格为准【下单前必须调用预估接口】
    /// </summary>
    public decimal EstimatedAmount { get; set; }

    /// <summary>
    /// 预估公里数
    /// </summary>
    public double Distance { get; set; }

    /// <summary>
    /// 预估行车时长
    /// </summary>
    public int Duration { get; set; }

    /// <summary>
    /// 是否渠道付款，0为渠道付
    /// </summary>
    public string? PayFlag { get; set; }

    /// <summary>
    /// 订单状态  0：生成订单，待支付   1：已支付完成   2：已完成订单   3：订单申请退款    4：订单已退款
    /// </summary>
    public int OrderState { get; set; }

    /// <summary>
    /// 用户备注
    /// </summary>
    public string? UserRemarks { get; set; }

    /// <summary>
    /// 系统记录
    /// </summary>
    public string? SysLog { get; set; }

    /// <summary>
    /// 总价
    /// </summary>
    public decimal TotalPrice { get; set; }

    /// <summary>
    /// 是否私有订单（不上传红旗系统）  0:不是私有单，上传（默认）  1：是私有单，不上传。
    /// </summary>
    public bool IsPriOrder { get; set; }

    /// <summary>
    /// 是否去程 1：是（去程默认）  0：否（回程）
    /// </summary>
    public bool IsGo { get; set; }

    /// <summary>
    /// 司机姓名
    /// </summary>
    public string? DriverName { get; set; }

    /// <summary>
    /// 车牌号码
    /// </summary>
    public string? CarNo { get; set; }

    /// <summary>
    /// 订单状态  默认1：正常  0：作废
    /// </summary>
    public bool Status { get; set; }

    /// <summary>
    /// 合作商户用户UID
    /// </summary>
    public string? BusinessUid { get; set; }
}
